/**
 *
 */
package wsepForum.network.common;


/**
 * Unit hold a Gui request from the client
 * @author Oren Ben-Haim & Ariel Rozen & Amir Harel
 *
 */
public class GUIRequest extends AGUIPacket {
	/**
	 * request types
	 *
	 */
	public static enum RequestType { GET_SETCION, GET_TOPIC, GET_MESSAGE, LOGIN, LOGOUT, REGISTER,SEARCH_BY_AUTHOR, SEARCH_BY_CONTENT,
		SEARCH_BY_DATES, REMOVE_USER, CREATE_SECTION, ADD_MOD_TO_SECTION, REMOVE_MOD, REMOVE_SECTION, CREATE_TOPIC,
		ADD_TO_TOPIC, EDIT_MESSAGE, DELETE_MESSAGE, GET_USER_LIST, GET_MNG_USER_LIST, CHNG_PASS };

	/**
	 * the request type
	 */
	private RequestType requestType;

	/*****************************
	 * CONSTRUCTOR               *
	 *****************************/
	public GUIRequest(RequestType rtype, Object[] args, int seq){
		super(args, seq);
		this.requestType = rtype;
	}

	/**
	 * getters
	 */
	public RequestType getRequestType() {
		return this.requestType;
	}


	public String toString() {
		return "GUIREQ:\nRequest type: " + this.requestType+"\nSequence Id:"+this.getSequenceID()+"\nArgsLen: "+this.getArguments().length;

	}

}
